/*
 *GCD,Greatest Common Divisor
*/

#include<stdio.h>

int return_GCD(int a, int b);

int main()
{
    printf("GCD(-8, -12) = %d\n", return_GCD(12, 8));

    return 0;
}

int return_GCD(int a, int b)
{
    if (!(a % b))
    {
        return b > 0 ? b : -b;
    }
    else
    {
        int tmp = a;
        a = b;
        b = tmp % b;
        return_GCD(a, b);
    }
}
